package java8;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Created by Administrator on 2022/10/24.
 */
public class LambdaDemo4 {
    public static void main(String[] args) {
        List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);
       long cnt =
                numbers.stream()
                        .filter(x -> x % 2 == 0)
                        .count();
        System.out.println(cnt);
    }
}
